Skip to main content

Menu Price file Import

Introduction​

This is generic menu price file import for any manufacturer. This will import vehicle file to Cloud SQL for PostgreSQL

Applicable Manufacturers​

  • KIA

Fields​

Field NameDescriptionDatatypeValidationMax lengthMandatoryExample
ModelModelStringA-Z and 0-920Y0TW5K9A1TEV1DD085
ModelYrModel YearNumeric0-94Y2023
ProductRepair Short DescStringA-Z20YSERVICING
Job DescriptionRepair Desc 1StringA-Z, 0-9 & All Special Characters100YSERVICE 10,000 or 12 MONTHS
Job VariantRepair Desc 2StringA-Z, 0-9 & All Special Characters100YStandard
Lab HoursLabour TimeNumberUp to 2 decimals4Y0.9
Part NoPart NumberStringA-Z, 0-9 & All Special Characters50Y2151323001
Part DescriptionPart NameStringA-Z, 0-9 & All Special Characters100YSump Plug Washer
IsFluid

A column to differentiate between parts and fluids

  • 0 is FALSE
  • -1 is TRUE
StringAllows -1 and 02Y-1
Unit PricePart PriceNumberUp to 2 decimals7Y1.5
QuantityPart/Fluid qtyNumberUp to 2 decimals5Y1

Note: If there are more columns in the csv, those will be ignored

Importing a file​

Preparation​

  1. Upload the file with filename as menu_price.csv into fnp-imports/{manufacturer}}(E.g. fnp-imports/kia) storage bucket

Validation​

Through Cloud Scheduler

  1. Go to Cloud Scheduler
  2. Run manufacturer_menu_price_validation job (job name could be different on other env)

Local

  1. Add the menu_price.csv file in importFiles folder
  2. Run npm run validate:menu-price can control the number of lines to validate using -l(number of lines), -s (start line) and -m (manufacturer)arguments

Importing​

Through Cloud Scheduler

  1. Go to Cloud Scheduler
  2. Run manufacturer_menu_price_import job (job name could be different on other env)

Local

Same as Validation, just the command is npm run import:menu-price

Testing​

  1. Data will be inserted to Cloud SQL for PostgreSQL under fpn database in table menu_price.
Status: Accepted
Category: Protected
Authored By: Gladson on Feb 07, 2025
Revisions